package com.platform.qujia.dao;


import com.platform.qujia.param.request.GoToInvoice;
import com.platform.qujia.pojo.InvoiceInfoVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @Auther: zxy
 * @Date: 2023/8/8 12:14
 * @Description: 小票相关
 */
@Repository
public interface InvoiceMapper {
    /**
     * 插入小票信息
     * @param invoiceInfo
     * @return
     */
    int insertInvoice( InvoiceInfoVo invoiceInfo);

    /**
     * 根据订单ID查询开票信息
     * @param orderNo
     * @return
     */
    InvoiceInfoVo selectInvoiceInfoByOrdNo(String orderNo);

    /**
     * 插入开票记录
     * @param infoVo
     * @return
     */
    int insertInvoiceRecord(InvoiceInfoVo infoVo);

    int updateInvoiceInfo(InvoiceInfoVo invoiceInfo);

    //获取当个订单开票记录
    List<InvoiceInfoVo> selectInvoiceRecordsByOrdNo(String orderNo);



    List<InvoiceInfoVo> queryByBusinessNameAndId(GoToInvoice invoice);

    InvoiceInfoVo selectInvoiceInfoByOrdNoAndBusinessName(@Param("orderNo") String orderNo,@Param("businessName") String businessName);
}
